Repository navigation
test: keep system.check_version's tests off the network - #1624
Merged
Merged
Conversation
SB_RELEASE_LATEST_URL was only defined by SystemTest's two upstream failure tests, so every test that ran before them and called system.check_version without a cached release (DispatcherTest, PermissionMatrixTest) fetched api.github.com, with a 5 second timeout where there's no network. Define it in the bootstrap, as a port nothing listens on, so no test reaches the network and an uncached fetch fails at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ChrisTX
added a commit
to ChrisTX/aur-packages
that referenced
this pull request
Nov 7, 2026
Backport sbpp/sourcebans-pp#1624: the tests point system.check_version at a refused port rather than api.github.com, which check() can't reach. Only the tests change, which the package leaves out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
archlinux-github
pushed a commit
to archlinux/aur
that referenced
this pull request
Nov 7, 2026
Backport sbpp/sourcebans-pp#1624: the tests point system.check_version at a refused port rather than api.github.com, which check() can't reach. Only the tests change, which the package leaves out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rumblefrog
approved these changes
Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
SB_RELEASE_LATEST_URLis now defined inweb/tests/bootstrap.php, as the refused porthttp://127.0.0.1:1/thatSystemTestalready used, instead of by the twoSystemTesttests themselves. Theirdefine()calls go, and the comments inSystemTestandDispatcherTestsay where the URL comes from now.Motivation and Context
The constant only existed once one of
SystemTest's failure tests had run. Tests that run before it and callsystem.check_versionwithout a cached release, likeDispatcherTestandPermissionMatrixTest, fetched the realhttps://api.github.com/repos/sbpp/sourcebans-pp/releases/latest. So the suite made requests to GitHub, and without network access, as in a sandboxed package build, each of those calls waited up to the 5-second timeout.DispatcherTest's own comment notes that "External fetch may fail in CI".How Has This Been Tested?
tests/apipasses against a local MariaDB.strace -e trace=connectonphpunit tests/api/DispatcherTest.phpwith an empty cache: before, 2 connections to port 443; after, none, and 2 refused connections to127.0.0.1:1.Types of changes
Checklist:
🤖 Generated with Claude Code